<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="com.crm.entity.QuotParts"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page import="com.crm.entity.Opportunity,com.crm.entity.Supplier,java.util.*,com.crm.entity.Quotation" %>
<head>
<link href="<%=application.getContextPath()%>/css/css-crm.css" rel="stylesheet" type="text/css" />



<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.7.2.min.js"></script>
<script language="javaScript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/jquery-ui-1.8.17.custom.css"/>
	
<script language="JavaScript" src="<%=application.getContextPath()%>/js/gen_validatorv4.js" type="text/javascript" ></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>	
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
</head>
<body>
<%Opportunity opprt =(Opportunity)request.getAttribute("oprtobj");%>
<div id="main">
   <%@ include file="common/header.jsp" %>
  <%@ include file="common/submenu.jsp" %>
  <div id="content">
  <form id="impform" name="impform"  action="<%=application.getContextPath()%>/newquot/QuotToEnq.do"   method="post">
    <div id="work-area2">
      <div class="heading2">Converting Quotation To Enquiery </div>
	  
      <div class="boxIFS">
         <table width="100%"  id="validtab" border="0" style="height:80px;"  cellspacing="0" cellpadding="0">
          <tr>
            <td width="700" align="left" valign="middle">
            <table width="700" border="0" cellspacing="0" cellpadding="0">
              <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
              <tr>
                <td align="right"  width=35%" valign="middle">Reference Number</td>
                <td align="center" width="65%" valign="top"><input  class="formbig" type="text" name="refno"  value="<%=opprt.getRefNum()%>"/>
             <input  class="formbig" type="hidden" name="refnoId"  value="<%=opprt.getId()%>"/>
             </td>
              </tr>
              <tr><td>&nbsp;</td></tr>
                <tr>
                <td align="right"  width=35%" valign="middle"></td>
                <td align="center" width="65%" valign="top">  
                 <div id="resultMsg" class="result_msg">
    <% String msg="You Want Convert This Enquiery To New Enquiery";
    	if(msg!=null){
    		out.println(msg);
    	}
    %>
    </div>
             </td>
              </tr>
                <tr><td>&nbsp;</td></tr>
                  <tr><td>&nbsp;</td></tr>
        </table>
            <table width="200" border="0" align="center" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" valign="middle"> <input  class="button"  onclick="javascript:return  myFunction()" type="submit"  value="YES"/></td>
                <td align="center" valign="middle"><a href="<%= application.getContextPath()%>/pendingQuot/show.do"><input  class="button" type="button"  value="NO"/></a></td>
           
              </tr>
             
            </table></td>
          </tr>
        </table>
          
      </div>
      <table style="height:200px; width:910px;" ><tr><td><div id="quotdiv" ></div></td></tr></table> 
    </div>
    </form>
  </div><div id="footer"></div>  
</div>
</body>
<!-- InstanceEnd --></html>
<script type="text/javascript">
function myFunction()
{
var x;
var r=confirm("Are You Sure!!!!!!");
if (r==true)
  {
return true;
  }
else
  {
 return false;
  }

}
</script>
<script language="JavaScript" type="text/javascript">
function processFormData(){
  var frmvalidator  = new Validator("impform");
  
  var rowcount=document.getElementById("rowcountid");
  var rowc=rowcount.value;
//alert("the rowcount value is"+rowc);
  for(var i=1;i<=rowc;i++)
	  {
  frmvalidator.addValidation("partno"+i,"req","Please enter PartNo"+i+"");
  /* frmvalidator.addValidation("partno"+i,"maxlen=30",	"Max length for partno"+i+" is 30");
  frmvalidator.addValidation("partno"+i,"alphanumeric","partno"+i+"Only alpha and Numeric chars only"); */
  
  frmvalidator.addValidation("make"+i,"req","Please enter made by"+i);
 /*  frmvalidator.addValidation("make"+i,"maxlen=30","Max length of made by"+i+"is 30 "); */
  
  frmvalidator.addValidation("required"+i,"req","Please enter Required"+i+" Quantity");
  frmvalidator.addValidation("required"+i,"numeric","Please RequiredQuantity"+i+" must be numeric");
  
  frmvalidator.addValidation("source"+i,"req","source"+i+" must not be empty");
    frmvalidator.addValidation("source"+i,"maxlen=50","maximum  length of source"+i+" is 50");
  /*   frmvalidator.addValidation("source"+i,"alphabetic_space","Source"+i+" must be characters"); */
    
  frmvalidator.addValidation("supplier"+i,"req","supplier"+i+" must not be empty");
/*   frmvalidator.addValidation("supplier"+i,"alphabetic_space"); */
  
  frmvalidator.addValidation("uvalue"+i,"req","unit price must not be empty");
  frmvalidator.addValidation("uvalue"+i,"numeric","Unit value should be number");
  
  frmvalidator.addValidation("fright"+i,"req","fright"+i+" must not be empty");
  frmvalidator.addValidation("fright"+i,"numeric","fright"+i+" value must be numeric");
 
  
  frmvalidator.addValidation("assesable"+i,"req","Assesable"+i+" must not be empty");
  frmvalidator.addValidation("assesable"+i,"numeric","Assesable"+i+" must be numeric");
  
  frmvalidator.addValidation("bcd"+i,"req"," BCD"+i+"must not be empty");
  frmvalidator.addValidation("bcd"+i,"numeric","BCD"+i+" must be numeric");
  
/*   frmvalidator.addValidation("stot"+i,"req","Sub Total"+i+" must not be empty"); */
  frmvalidator.addValidation("stot"+i,"numeric","Sub Total"+i+" must be numeric");
  
  frmvalidator.addValidation("margin"+i,"req","Margin"+i+"must not be empty");
  frmvalidator.addValidation("margin"+i,"numeric","Margin"+i+" must be numeric");
  
  frmvalidator.addValidation("quotprice"+i,"req","Quotation"+i+" price must not be empty");
  frmvalidator.addValidation("quotprice"+i,"numeric","Quotation"+i+" must be numeric");
  
 
	  }
}
</script>